package structural.flyweight;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description: 驾校车池
 * @Author: lxt
 * @CreateDate: 2019/11/1
 **/
public class CarFactory {
    private static final Map<String, ICar> pool = new HashMap<String, ICar>();

    public static void putCat(String id, ICar car) {
        pool.put(id, car);
    }

    public static ICar getCar(String id) {
        return pool.get(id);
    }
}
